//
//  WeddingCarCartCell.h
//  BaseProject
//
//  Created by 王洋 on 2021/5/11.
//  Copyright © 2021 王洋. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "WeddingCarCartModel.h"
#import "WeddingCarCartModel.h"

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger, WeddingCarCartCellActionType) {
    //选中
    WeddingCarCartCellActionType_sel,
    //减少
    WeddingCarCartCellActionType_cut,
    //增加
    WeddingCarCartCellActionType_add
};


@interface WeddingCarCartCell : UITableViewCell <UITextFieldDelegate>

@property (weak, nonatomic) IBOutlet UIButton *selBtn;

@property (weak, nonatomic) IBOutlet UIView *skuBGView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *skuHeightConstrain;

@property (weak, nonatomic) IBOutlet UIImageView *mainImageView;
@property (weak, nonatomic) IBOutlet UILabel *mainTitleLab;

@property (weak, nonatomic) IBOutlet UILabel *priceLab;

@property (weak, nonatomic) IBOutlet UITextField *countTF;
@property (weak, nonatomic) IBOutlet UIButton *addBtn;
@property (weak, nonatomic) IBOutlet UIButton *cutBtn;

@property (weak, nonatomic) IBOutlet UILabel *invalidLab;


@property (nonatomic, copy) void(^WeddingCarCartCellBlock)(WeddingCarCartCellActionType type);

@property (nonatomic, copy) void(^textFieldShouldEndEditingBlock)(UITextField *textField);

- (void)fillCellWithModel:(WeddingCarCartModel *)model;

+(CGFloat)calculateHeightWithModel:(WeddingCarCartModel *)model;

@end

NS_ASSUME_NONNULL_END
